<?php

namespace Api\Enums;

use Catch\Enums\Enum;
enum YidaType : int implements Enum
{
    case LANSHOU = 1;
    case  YUNSHU = 2;
    case  QIANSHOU = 3;

    case REJECT = 4;

    case CANCEL = 99;

    public function value(): int
    {
        // TODO: Implement value() method.
        return match ($this) {
            self::LANSHOU => 1,
            self::YUNSHU => 2,
            self::QIANSHOU => 3,
            self::REJECT => 4,
            self::CANCEL => 99,
        };
    }

    public function name(): string
    {
        // TODO: Implement name() method.
        return match ($this) {
            self::LANSHOU => '待揽收',
            self::YUNSHU => '运输中',
            self::QIANSHOU => '已签收',
            self::REJECT => '已拒绝',
            self::CANCEL => '已取消',
        };
    }

}

